from selenium import selenium
import unittest, xmlrunner, os, re

class Demo(unittest.TestCase):


    def setUp(self):
        self.verificationErrors = []
        self.selenium = selenium("localhost", 4444, "*chrome", "https://workflowy.com/")
        self.selenium.start()
    def apples(self):
        print ("Hello world")
    
    def test_hh(self):
        sel = self.selenium
        sel.open("/accounts/register/")
        try: self.assertEqual("Sign Up FAIL", "Sign Up FAIL","Sign Up button issue1")
        except AssertionError, e: self.verificationErrors.append(str(e))
        try: self.assertEqual("Sign Up FAIL", "Sign Up FAIL1","Sign Up button issue2")
        except AssertionError, e: self.verificationErrors.append(str(e))
        self.apples()
    
    def tearDown(self):
        self.selenium.stop()
        self.assertEqual([], self.verificationErrors)


if __name__ == "__main__":
    #unittest.main()
    unittest.main(testRunner=xmlrunner.XMLTestRunner(output='test-reports'))



